package com.xiewenyu.controller;

import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class HelloApiController {

    @RequestMapping("/apihello")//声明 Bean 对象，为一个控制器组
    public String myFirstRequest(Model model) {
        model.addAttribute("msg", "中国人");
        System.out.println("请求转发进行中");
        return "hello中国";  //此处是对视图解析器处进行了字符串拼接，全路径为 ：/WEB-INF/pages/success.jsp
    }

}
